// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.
#![allow(rustdoc::redundant_explicit_links)]
#![allow(rustdoc::broken_intra_doc_links)]

/// Implements a client for the Access Context Manager API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_identity_accesscontextmanager_v1::client::AccessContextManager;
/// let client = AccessContextManager::builder().build().await?;
/// // use `client` to make requests to the Access Context Manager API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// API for setting [access levels]
/// [google.identity.accesscontextmanager.v1.AccessLevel] and [service
/// perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter]
/// for Google Cloud projects. Each organization has one [access policy]
/// [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the
/// [access levels] [google.identity.accesscontextmanager.v1.AccessLevel]
/// and [service perimeters]
/// [google.identity.accesscontextmanager.v1.ServicePerimeter]. This
/// [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is
/// applicable to all resources in the organization.
/// AccessPolicies
///
/// # Configuration
///
/// To configure `AccessContextManager` use the `with_*` methods in the type returned
/// by [builder()][AccessContextManager::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://accesscontextmanager.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::access_context_manager::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::access_context_manager::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `AccessContextManager` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `AccessContextManager` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct AccessContextManager {
    inner: std::sync::Arc<dyn super::stub::dynamic::AccessContextManager>,
}

impl AccessContextManager {
    /// Returns a builder for [AccessContextManager].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_identity_accesscontextmanager_v1::client::AccessContextManager;
    /// let client = AccessContextManager::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::access_context_manager::ClientBuilder {
        gax::client_builder::internal::new_builder(
            super::builder::access_context_manager::client::Factory,
        )
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::AccessContextManager + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::AccessContextManager>>
    {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::AccessContextManager> {
        super::transport::AccessContextManager::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::AccessContextManager> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::AccessContextManager::new)
    }

    /// Lists all [access policies]
    /// [google.identity.accesscontextmanager.v1.AccessPolicy] in an
    /// organization.
    pub fn list_access_policies(
        &self,
    ) -> super::builder::access_context_manager::ListAccessPolicies {
        super::builder::access_context_manager::ListAccessPolicies::new(self.inner.clone())
    }

    /// Returns an [access policy]
    /// [google.identity.accesscontextmanager.v1.AccessPolicy] based on the name.
    pub fn get_access_policy(&self) -> super::builder::access_context_manager::GetAccessPolicy {
        super::builder::access_context_manager::GetAccessPolicy::new(self.inner.clone())
    }

    /// Creates an access policy. This method fails if the organization already has
    /// an access policy. The long-running operation has a successful status
    /// after the access policy propagates to long-lasting storage.
    /// Syntactic and basic semantic errors are returned in `metadata` as a
    /// BadRequest proto.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_access_policy(
        &self,
    ) -> super::builder::access_context_manager::CreateAccessPolicy {
        super::builder::access_context_manager::CreateAccessPolicy::new(self.inner.clone())
    }

    /// Updates an [access policy]
    /// [google.identity.accesscontextmanager.v1.AccessPolicy]. The
    /// long-running operation from this RPC has a successful status after the
    /// changes to the [access policy]
    /// [google.identity.accesscontextmanager.v1.AccessPolicy] propagate
    /// to long-lasting storage.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_access_policy(
        &self,
    ) -> super::builder::access_context_manager::UpdateAccessPolicy {
        super::builder::access_context_manager::UpdateAccessPolicy::new(self.inner.clone())
    }

    /// Deletes an [access policy]
    /// [google.identity.accesscontextmanager.v1.AccessPolicy] based on the
    /// resource name. The long-running operation has a successful status after the
    /// [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy]
    /// is removed from long-lasting storage.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_access_policy(
        &self,
    ) -> super::builder::access_context_manager::DeleteAccessPolicy {
        super::builder::access_context_manager::DeleteAccessPolicy::new(self.inner.clone())
    }

    /// Lists all [access levels]
    /// [google.identity.accesscontextmanager.v1.AccessLevel] for an access
    /// policy.
    pub fn list_access_levels(&self) -> super::builder::access_context_manager::ListAccessLevels {
        super::builder::access_context_manager::ListAccessLevels::new(self.inner.clone())
    }

    /// Gets an [access level]
    /// [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource
    /// name.
    pub fn get_access_level(&self) -> super::builder::access_context_manager::GetAccessLevel {
        super::builder::access_context_manager::GetAccessLevel::new(self.inner.clone())
    }

    /// Creates an [access level]
    /// [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running
    /// operation from this RPC has a successful status after the [access
    /// level] [google.identity.accesscontextmanager.v1.AccessLevel]
    /// propagates to long-lasting storage. If [access levels]
    /// [google.identity.accesscontextmanager.v1.AccessLevel] contain
    /// errors, an error response is returned for the first error encountered.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_access_level(&self) -> super::builder::access_context_manager::CreateAccessLevel {
        super::builder::access_context_manager::CreateAccessLevel::new(self.inner.clone())
    }

    /// Updates an [access level]
    /// [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running
    /// operation from this RPC has a successful status after the changes to
    /// the [access level]
    /// [google.identity.accesscontextmanager.v1.AccessLevel] propagate
    /// to long-lasting storage. If [access levels]
    /// [google.identity.accesscontextmanager.v1.AccessLevel] contain
    /// errors, an error response is returned for the first error encountered.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_access_level(&self) -> super::builder::access_context_manager::UpdateAccessLevel {
        super::builder::access_context_manager::UpdateAccessLevel::new(self.inner.clone())
    }

    /// Deletes an [access level]
    /// [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource
    /// name. The long-running operation from this RPC has a successful status
    /// after the [access level]
    /// [google.identity.accesscontextmanager.v1.AccessLevel] has been removed
    /// from long-lasting storage.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_access_level(&self) -> super::builder::access_context_manager::DeleteAccessLevel {
        super::builder::access_context_manager::DeleteAccessLevel::new(self.inner.clone())
    }

    /// Replaces all existing [access levels]
    /// [google.identity.accesscontextmanager.v1.AccessLevel] in an [access
    /// policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with
    /// the [access levels]
    /// [google.identity.accesscontextmanager.v1.AccessLevel] provided. This
    /// is done atomically. The long-running operation from this RPC has a
    /// successful status after all replacements propagate to long-lasting
    /// storage. If the replacement contains errors, an error response is returned
    /// for the first error encountered.  Upon error, the replacement is cancelled,
    /// and existing [access levels]
    /// [google.identity.accesscontextmanager.v1.AccessLevel] are not
    /// affected. The Operation.response field contains
    /// ReplaceAccessLevelsResponse. Removing [access levels]
    /// [google.identity.accesscontextmanager.v1.AccessLevel] contained in existing
    /// [service perimeters]
    /// [google.identity.accesscontextmanager.v1.ServicePerimeter] result in an
    /// error.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn replace_access_levels(
        &self,
    ) -> super::builder::access_context_manager::ReplaceAccessLevels {
        super::builder::access_context_manager::ReplaceAccessLevels::new(self.inner.clone())
    }

    /// Lists all [service perimeters]
    /// [google.identity.accesscontextmanager.v1.ServicePerimeter] for an
    /// access policy.
    pub fn list_service_perimeters(
        &self,
    ) -> super::builder::access_context_manager::ListServicePerimeters {
        super::builder::access_context_manager::ListServicePerimeters::new(self.inner.clone())
    }

    /// Gets a [service perimeter]
    /// [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the
    /// resource name.
    pub fn get_service_perimeter(
        &self,
    ) -> super::builder::access_context_manager::GetServicePerimeter {
        super::builder::access_context_manager::GetServicePerimeter::new(self.inner.clone())
    }

    /// Creates a [service perimeter]
    /// [google.identity.accesscontextmanager.v1.ServicePerimeter]. The
    /// long-running operation from this RPC has a successful status after the
    /// [service perimeter]
    /// [google.identity.accesscontextmanager.v1.ServicePerimeter]
    /// propagates to long-lasting storage. If a [service perimeter]
    /// [google.identity.accesscontextmanager.v1.ServicePerimeter] contains
    /// errors, an error response is returned for the first error encountered.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_service_perimeter(
        &self,
    ) -> super::builder::access_context_manager::CreateServicePerimeter {
        super::builder::access_context_manager::CreateServicePerimeter::new(self.inner.clone())
    }

    /// Updates a [service perimeter]
    /// [google.identity.accesscontextmanager.v1.ServicePerimeter]. The
    /// long-running operation from this RPC has a successful status after the
    /// [service perimeter]
    /// [google.identity.accesscontextmanager.v1.ServicePerimeter]
    /// propagates to long-lasting storage. If a [service perimeter]
    /// [google.identity.accesscontextmanager.v1.ServicePerimeter] contains
    /// errors, an error response is returned for the first error encountered.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_service_perimeter(
        &self,
    ) -> super::builder::access_context_manager::UpdateServicePerimeter {
        super::builder::access_context_manager::UpdateServicePerimeter::new(self.inner.clone())
    }

    /// Deletes a [service perimeter]
    /// [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the
    /// resource name. The long-running operation from this RPC has a successful
    /// status after the [service perimeter]
    /// [google.identity.accesscontextmanager.v1.ServicePerimeter] is removed from
    /// long-lasting storage.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_service_perimeter(
        &self,
    ) -> super::builder::access_context_manager::DeleteServicePerimeter {
        super::builder::access_context_manager::DeleteServicePerimeter::new(self.inner.clone())
    }

    /// Replace all existing [service perimeters]
    /// [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [access
    /// policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the
    /// [service perimeters]
    /// [google.identity.accesscontextmanager.v1.ServicePerimeter] provided. This
    /// is done atomically. The long-running operation from this RPC has a
    /// successful status after all replacements propagate to long-lasting storage.
    /// Replacements containing errors result in an error response for the first
    /// error encountered. Upon an error, replacement are cancelled and existing
    /// [service perimeters]
    /// [google.identity.accesscontextmanager.v1.ServicePerimeter] are not
    /// affected. The Operation.response field contains
    /// ReplaceServicePerimetersResponse.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn replace_service_perimeters(
        &self,
    ) -> super::builder::access_context_manager::ReplaceServicePerimeters {
        super::builder::access_context_manager::ReplaceServicePerimeters::new(self.inner.clone())
    }

    /// Commits the dry-run specification for all the [service perimeters]
    /// [google.identity.accesscontextmanager.v1.ServicePerimeter] in an
    /// [access policy][google.identity.accesscontextmanager.v1.AccessPolicy].
    /// A commit operation on a service perimeter involves copying its `spec` field
    /// to the `status` field of the service perimeter. Only [service perimeters]
    /// [google.identity.accesscontextmanager.v1.ServicePerimeter] with
    /// `use_explicit_dry_run_spec` field set to true are affected by a commit
    /// operation. The long-running operation from this RPC has a successful
    /// status after the dry-run specifications for all the [service perimeters]
    /// [google.identity.accesscontextmanager.v1.ServicePerimeter] have been
    /// committed. If a commit fails, it causes the long-running operation to
    /// return an error response and the entire commit operation is cancelled.
    /// When successful, the Operation.response field contains
    /// CommitServicePerimetersResponse. The `dry_run` and the `spec` fields are
    /// cleared after a successful commit operation.
    ///
    /// [google.identity.accesscontextmanager.v1.AccessPolicy]: crate::model::AccessPolicy
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn commit_service_perimeters(
        &self,
    ) -> super::builder::access_context_manager::CommitServicePerimeters {
        super::builder::access_context_manager::CommitServicePerimeters::new(self.inner.clone())
    }

    /// Lists all [GcpUserAccessBindings]
    /// [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for a
    /// Google Cloud organization.
    pub fn list_gcp_user_access_bindings(
        &self,
    ) -> super::builder::access_context_manager::ListGcpUserAccessBindings {
        super::builder::access_context_manager::ListGcpUserAccessBindings::new(self.inner.clone())
    }

    /// Gets the [GcpUserAccessBinding]
    /// [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] with
    /// the given name.
    pub fn get_gcp_user_access_binding(
        &self,
    ) -> super::builder::access_context_manager::GetGcpUserAccessBinding {
        super::builder::access_context_manager::GetGcpUserAccessBinding::new(self.inner.clone())
    }

    /// Creates a [GcpUserAccessBinding]
    /// [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If the
    /// client specifies a [name]
    /// [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name],
    /// the server ignores it. Fails if a resource already exists with the same
    /// [group_key]
    /// [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.group_key].
    /// Completion of this long-running operation does not necessarily signify that
    /// the new binding is deployed onto all affected users, which may take more
    /// time.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_gcp_user_access_binding(
        &self,
    ) -> super::builder::access_context_manager::CreateGcpUserAccessBinding {
        super::builder::access_context_manager::CreateGcpUserAccessBinding::new(self.inner.clone())
    }

    /// Updates a [GcpUserAccessBinding]
    /// [google.identity.accesscontextmanager.v1.GcpUserAccessBinding].
    /// Completion of this long-running operation does not necessarily signify that
    /// the changed binding is deployed onto all affected users, which may take
    /// more time.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_gcp_user_access_binding(
        &self,
    ) -> super::builder::access_context_manager::UpdateGcpUserAccessBinding {
        super::builder::access_context_manager::UpdateGcpUserAccessBinding::new(self.inner.clone())
    }

    /// Deletes a [GcpUserAccessBinding]
    /// [google.identity.accesscontextmanager.v1.GcpUserAccessBinding].
    /// Completion of this long-running operation does not necessarily signify that
    /// the binding deletion is deployed onto all affected users, which may take
    /// more time.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_gcp_user_access_binding(
        &self,
    ) -> super::builder::access_context_manager::DeleteGcpUserAccessBinding {
        super::builder::access_context_manager::DeleteGcpUserAccessBinding::new(self.inner.clone())
    }

    /// Sets the IAM policy for the specified Access Context Manager
    /// [access policy][google.identity.accesscontextmanager.v1.AccessPolicy].
    /// This method replaces the existing IAM policy on the access policy. The IAM
    /// policy controls the set of users who can perform specific operations on the
    /// Access Context Manager [access
    /// policy][google.identity.accesscontextmanager.v1.AccessPolicy].
    ///
    /// [google.identity.accesscontextmanager.v1.AccessPolicy]: crate::model::AccessPolicy
    pub fn set_iam_policy(&self) -> super::builder::access_context_manager::SetIamPolicy {
        super::builder::access_context_manager::SetIamPolicy::new(self.inner.clone())
    }

    /// Gets the IAM policy for the specified Access Context Manager
    /// [access policy][google.identity.accesscontextmanager.v1.AccessPolicy].
    ///
    /// [google.identity.accesscontextmanager.v1.AccessPolicy]: crate::model::AccessPolicy
    pub fn get_iam_policy(&self) -> super::builder::access_context_manager::GetIamPolicy {
        super::builder::access_context_manager::GetIamPolicy::new(self.inner.clone())
    }

    /// Returns the IAM permissions that the caller has on the specified Access
    /// Context Manager resource. The resource can be an
    /// [AccessPolicy][google.identity.accesscontextmanager.v1.AccessPolicy],
    /// [AccessLevel][google.identity.accesscontextmanager.v1.AccessLevel], or
    /// [ServicePerimeter][google.identity.accesscontextmanager.v1.ServicePerimeter
    /// ]. This method does not support other resources.
    ///
    /// [google.identity.accesscontextmanager.v1.AccessLevel]: crate::model::AccessLevel
    /// [google.identity.accesscontextmanager.v1.AccessPolicy]: crate::model::AccessPolicy
    pub fn test_iam_permissions(
        &self,
    ) -> super::builder::access_context_manager::TestIamPermissions {
        super::builder::access_context_manager::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::access_context_manager::GetOperation {
        super::builder::access_context_manager::GetOperation::new(self.inner.clone())
    }
}
